import config from "@/config";
import http from "@/utils/request";

export default {
	page: {
		url: `${config.API_URL}/business/article/page`,
		name: "文稿管理列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	advicePage: {
		url: `${config.API_URL}/business/article/advicePage`,
		name: "退稿建议列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	publishedPage: {
		url: `${config.API_URL}/business/article/publishedPage`,
		name: "已发布文稿列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	publishPage: {
		url: `${config.API_URL}/business/article/publishPage`,
		name: "编辑-文稿列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	allotPage: {
		url: `${config.API_URL}/business/article/allotPage`,
		name: "编辑-文稿列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	advisePage: {
		url: `${config.API_URL}/business/article/advisePage`,
		name: "编辑-文稿列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	checkPage: {
		url: `${config.API_URL}/business/article/checkPage`,
		name: "专家-文稿列表",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	detail: {
		url: `${config.API_URL}/business/article/detail`,
		name: "详情",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	callbackDetail: {
		url: `${config.API_URL}/business/article/callbackDetail`,
		name: "查看退稿建议",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	callback: {
		url: `${config.API_URL}/business/article/callback`,
		name: "退稿回复",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	submit: {
		url: `${config.API_URL}/business/article/submit`,
		name: "提交",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	publish: {
		url: `${config.API_URL}/business/article/publish`,
		name: "发布/取消发布",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	check: {
		url: `${config.API_URL}/business/article/check`,
		name: "审核",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	add: {
		url: `${config.API_URL}/business/article/add`,
		name: "新增",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	update: {
		url: `${config.API_URL}/business/article/update`,
		name: "修改",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	delete: {
        url: `${config.API_URL}/business/article/delete`,
        name: "删除",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
	batchDelete: {
		url: `${config.API_URL}/business/article/batchDelete`,
		name: "批量删除",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
};
